package beans;

import com.google.gson.Gson;

public class TestItemBean {
	private int id;
	private int userStoryId;
	private String name;
	private String description;
	private String expectedResults;
	
	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	
	public int getUserStoryId() {
		return userStoryId;
	}

	public void setUserStoryId(int userStoryId) {
		this.userStoryId = userStoryId;
	}

	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getExpectedResults() {
		return expectedResults;
	}

	public void setExpectedResults(String expectedResults) {
		this.expectedResults = expectedResults;
	}

	public String getJson() {
		StringBuffer sb = new StringBuffer();
		Gson gson = new Gson();
		
		sb.append("{");
		sb.append("\"id\": " + gson.toJson(id) + ",");
		sb.append("\"user_story_id\": " + gson.toJson(userStoryId) + ",");
		sb.append("\"name\": " + gson.toJson(name) + ",");
		sb.append("\"description\": " + gson.toJson(description) + ",");
		sb.append("\"expected_results\": " + gson.toJson(expectedResults));
		sb.append("}");
		
		return sb.toString();
	}
}
